import service from "@/utils/request";

export function login(data) {
  return service({
    url: "/index/login",
    method: "POST",
    data,
  });
}

export function getInfo() {
  return service({
    url: "/index/userinfo",
    method: "POST",
  });
}



// 查询标签列表
export const getUserListApi = (params) => {
  return service({
    url: '/permission/user',
    method: 'get',
    params: params
  })
}

// 按钮
export const changeApi = (data) => {
  return service({
    url: `/permission/user/ ${data.id}/${data.status}`,
    method: 'get',
    data
  })
}



// 查询单个标签
export const getUserInfoApi = (params) => {
  return service({
    url: '/permission/user/',
    method: 'get',
    params: params
  })
}


// 增加标签
export const addUserApi = (data) => {
  return service({
    url: '/permission/user',
    method: 'post',
    data: data
  })
}

// 修改标签
export const editUserApi = (data) => {
  return service({
    url: '/permission/user/' + data.id,
    method: 'put',
    data: data
  })
}
// 删除标签
export const delUserApi = (params) => {
  return service({
    url: '/permission/user/' + data.id,
    method: 'DELETE',
    params: params
  })
}
